#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

void Init(int arr[])
{
	int i = 0;
	int k = 0;
	for (i = 0; i <= 3; i++)
	{
		scanf("%d", &k);
		arr[i] = k;
	}
}

void print(int arr[])
{
	int i = 0;
	for (i = 0; i <= 3; i++)
	{
		printf("%d\n", arr[i]);
	}
}

 void reverse(int arr[],int sz)
{
	int left = 0;
	int right = sz-1;
	if (left <= right)
	{
		while (left <= right)
		{
			int tep = arr[left];
			arr[left] = arr[right];
			arr[right] = tep;
			left++;
			right--;
		}
	}
	int i = 0;
	for (i = 0; i <= 3; i++)
	{
		printf("%d\n", arr[i]);
	}
}

int main()
{
	int arr[4] = { 0 };
	Init(arr);
	int sz = sizeof(arr) / sizeof(arr[0]);
	print(arr);
	reverse(arr,sz);
	return 0;
}